<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>添加商品</title>
	 <link rel="stylesheet" href="__PUBLIC__/css/index.css">
  <script src="__PUBLIC__/js/jquery-1.7.2.min.js"></script>
  <script src="__PUBLIC__/js/js.js"></script>
      <style>     
           #add{
                color:red;
                cursor:pointer;
                height:100px;
           }
           .bac{
               background:#F3F3F3;
           }
           .guige{
            cursor:pointer;
           }
       </style>
       <js file="__CONTROL_TPL__/js/js.js"/>
</head>
<body>
	<form method="post" enctype="multipart/form-data" class="form">
               <div class="wrap">
                <!-- 顶部菜单区域 -->
			<div class="menu_list">
				<ul>
				<li>
					<a href="{|U:index}">商品列表</a>
				</li>
				<li>
					<a href="" class="action">添加商品</a>
				</li>
			                  </ul>
			</div>
      <!-- 顶部菜单区域结束 -->


      <!-- tab切换开始 -->
                  <div class="tab">
      				<ul>
      					<li   class="btn1 w100 action">
      						基本信息
      					</li>
      					<li  class="btn1 w100">
      						详细内容
      					</li>
      					<li  class="btn1 w100">
      						图片
      					</li>
      				</ul>
	
				<!-- 基本信息 -->
                                    <div class="tab-content">
                                    	<table class="table2" >
                                    		<tr>
                                    			<th class="w150">名称</th>
                                    			<td >
                                    				<input type="text" name="gname" id="" class="w300">
                                    			</td>
                                    		</tr>
                                    		<tr>
                                    			<th class="w150">属性</th>
                                    			<td >
                                    				<label>置顶<input type="checkbox" name="flag[]" id="" value="置顶"></label>
                                    				<label>推荐<input type="checkbox" name="flag[]" id="" value="推荐"></label>
                                    			</td>
                                    		</tr>
                                    		<tr>
                                    			<th class="w150">栏目</th>
                                    			<td >
                                    				          <list from="$data" name="d" >
                                                                         <if value="{$d.cid} eq {$arr[1]}">{$d.cname}
                                                                          <input type="hidden" name="cid" value="{$d.cid}">
                                                                         </if>
                                    				          </list>
                                    			</td>
                                    		 </tr>
                                            <tr>
                                              <th class="w150">商品属性类型</th>
                                                <td>
                                                  <table>
                                                   <list from="$attrData" name="attr">
                                                    <tr>
                                                      <th class="w100">{$attr.attr_name}</th>
                                                    <td>{$attr.html}</td>
                                                    </tr>
                                                   </list>
                                                    </table>
                                                </td>
                                            </tr>

                                             <tr>
                                              <th class="w150">商品属性规格</th>
                                                <td>
                                                  <table>
                                                    <tr align="center">
                                                      <list from="$GoodSpecData" name="spec">
                                                        <td>{$spec.attr_name}</td>
                                                      </list>
                                                      <td>库存</td>
                                                      <td>价格</td>
                                                      <td>货号</td>
                                                      <td>操作</td>
                                                    </tr>
                                                  <tbody>
                                                        <tr class="one">
                                                       <list from="$GoodSpecData" name="spec">
                                                        <td>{$spec.html}</td>
                                                      </list>
                                                      <td>
                                                        <input type="text" name="stock[]" id="">
                                                      </td>
                                                      <td>
                                                        <input type="text" name="price[]" id="">
                                                      </td>
                                                      <td>
                                                        <input type="text" name="goods_sn[]" id="">
                                                      </td>
                                                      <td align="center">
                                                         <span class="guige" onclick="addSpec(this)" >加（+）</span>
                                                      </td>
                                                    </tr>
                                                   
                                                  </tbody>
                                                
                                                    </table>
                                                </td>
                                            </tr>


                                                 <tr>
                                                      <th class="w150">品牌</th>
                                                      <td >
                                                            <select name="brandid" id="" class="w150">
                                                                  <option value="">==请选择==</option>
                                                                      <list from="$brand" name="bra" >
                                                                        <option value="{$bra.bid}">{$bra.bname}</option>
                                                                      </list>
                                                            </select>
                                                      </td>
                                                 </tr>
                                    		<!--  <tr>
                                    		 	<th class="w150">价格</th>
                                    		          <td>
                                    		          	<input type="text" name="price" id="" class="w300">
                                    		          </td>
                                    		 </tr> -->
                                    		<!--  <tr>
                                    		 	<th class="w150">库存</th>
                                    		          <td>
                                    		          	<input type="text" name="stock" id="" class="w300">
                                    		          </td>
                                    		 </tr> -->
                                    		  <tr>
                                    		 	<th class="w150">关键字</th>
                                    		          <td>
                                    		          	<input type="text" name="keywords" id="" class="w300">
                                    		          </td>
                                    		 </tr>
                                    		   <tr>
                                    		 	<th class="w150">描述</th>
                                    		          <td>
                                    		          	<textarea name="description" id="" cols="30" rows="10" class="w400 h100"></textarea>
                                    		          </td>
                                    		 </tr>
                                    	</table>
                            </div>
                    <!-- 基本信息结束 -->
                    <!-- 详细信息开始 -->
                                        <div class="tab-content" >
                                    	<table class="table2" >
                                    		<tr>
                                    			<th class="w150">内容</th>
                                    			<td >
                                    				<ueditor name="body"/>
                                    			</td>
                                    		</tr>
                                    		<tr>
                                    			<th class="w150">服务</th>
                                    			<td >
                                    				<input type="text" name="service" id="" class="w300">
                                    			</td>
                                    		</tr>
                                    		<tr>
                                    			<th class="w150">查看次数</th>
                                    			<td >
                                    				<input type="text" name="click" id="" class="w300">
                                    			</td>
                                    		</tr>
                                                            <tr>
                                                                  <th class="w150">更新时间</th>
                                                                  <td >
                                                                        <input type="text" name="addtime" id="addtime" class="w300" readonly="readonly"   >
                                                                  </td>
                                                            </tr>
                                    	</table>
                                       </div>
                          <!-- 详细信息结束 -->
                          <!-- 图片区域开始 -->
                                    <div class="tab-content">
                                    	<table class="table2">
                                    		<tr>
                                    			<th class="w150">首页图</th>
                                    			<td ><input type="file" name="index_pic" id=""  ></td>
                                    		</tr>
                                    		<tr>
                                    			<th>列表图</th>
                                    			<td>
                                    				<input type="file" name="list_pic" id="">
                                    			</td>
                                    		</tr>
                                                            <tr>
                                                                  <th>内容图</th>
                                                                  <td id="td" >
                                                                        <div class="content">
                                                                              <input type="file" name="pic[]" id="" class="w150">
                                                                           <span id="add" >增加（+）</span>
                                                                        </div>
                                                                  </td>
                                                            </tr>
                                    	</table>
                                    </div>
                              <!-- 图片区域结束 -->
                  </div>
                     
		<!-- 底部确定按钮 -->
		<div class="position-bottom">
			<input type="submit" value="确定" class="btn">
		</div>
	</form>
</body>
<script>
      $("#addtime").calendar({format: 'yyyy/MM/dd HH:mm:ss'});
      var input="<div style='margin-top:10px' class='content'><input type='file' name='pic[]' id= class='w150' class='w150' ><span style='color:red;margin-left:5px;cursor:pointer'  class='del1'>减少（-）<span></div>";
      $("#add").click(function(){
            $("#td").append(input);
      })
      $(".del1").live("click",function(){
            $(this).parent().remove();
      })
      $(".content").live("hover",function(){
            $(this).addClass('bac').siblings('.content').removeClass('bac');
      })
</script>
</html>








